<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <title>首页|星途后台管理系统</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta name="author" content="<?php echo C('WEB_SITE_TITLE');?>">
    <meta name="keywords" content="<?php echo ($meta_keywords); ?>">
    <meta name="description" content="<?php echo ($meta_description); ?>">
    <meta name="generator" content="CoreThink">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-title" content="<?php echo C('WEB_SITE_TITLE');?>">
    <meta name="format-detection" content="telephone=no,email=no">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <link rel="apple-touch-icon" type="image/x-icon" href="/fzsp/xingtu.ico">
    <link rel="shortcut icon" type="image/x-icon" href="/fzsp/xingtu.ico">
    <link rel="stylesheet" type="text/css" href="http://127.0.0.1/fzsp/Public/libs/lyui/dist/css/lyui.min.css">
    <link rel="stylesheet" type="text/css" href="http://127.0.0.1/fzsp/Application/Admin/View/Public/css/<?php if(C('ADMIN_THEME')){echo C('ADMIN_THEME');}else{echo 'admin';} ?>.css">
    <link rel="stylesheet" type="text/css" href="http://127.0.0.1/fzsp/Public/libs/animate/animate.min.css">
    
    <style type="text/css">
    /* Builder样式 */
    .builder .builder-container .builder-data-empty {
        margin-bottom: 20px;
        background-color: #f9f9f9;
    }
    .builder .builder-container .builder-data-empty .empty-info {
        padding: 130px 0;
        color: #555;
    }
    .builder .builder-container .builder-table .panel {
        overflow-y: hidden;
    }
    .builder .builder-container .builder-table .table td {
        max-width: 600px;
        vertical-align: middle;
    }
    .builder .builder-container .builder-table .table td img.picture {
        max-width: 200px;
        max-height: 40px;
    }
    .builder .builder-container .pagination {
        margin-top: 0px;
    }
    .builder.formbuilder-box .form-builder .img-box .remove-picture {
        color: red;
        position: absolute;
        top: -6px;
        right: -6px;
        background: #fff;
        border-radius: 20px;
        cursor: pointer;
    }
    .builder.formbuilder-box .form-builder .img-box .remove-picture:hover {
        color: #DD0000;
        box-shadow: inset 0 1px 1px red, 0 0 8px red;
    }
    .builder.formbuilder-box .form-builder .file-box .remove-file {
        color: red;
        position: absolute;
        top: 12px;
        right: 10px;
        border-radius: 20px;
        cursor: pointer;
    }
    .builder.formbuilder-box .form-builder .file-box .remove-file:hover {
        color: #DD0000;
        box-shadow: inset 0 1px 1px red, 0 0 8px red;
    }
    .builder.formbuilder-box .form-builder .board_list .board {
        padding: 0px;
        margin-right: 10px;
    }
    .builder.formbuilder-box .form-builder .check-tips {
        color: #999;
        margin-top: 5px;
        display: inline-block;
    }
    .builder.listbuilder-box .check-tips {
        display: none;
    }
    @media (min-width: 768px) {
        .builder.formbuilder-box .form-builder .input,
        .builder.formbuilder-box .form-builder .select,
        .builder.formbuilder-box .form-builder .textarea,
        .builder.formbuilder-box .form-builder .file-box {
            width: 70%;
        }
        .builder.formbuilder-box .form-builder .bottom_button_list {
            margin-bottom: 30px;
        }
        .builder.formbuilder-box .form-builder .bottom_button_list .btn {
            min-width: 120px;
        }
        .builder.formbuilder-box .form-builder.form-horizontal {
            padding: 0 15px;
        }
        .builder.formbuilder-box .form-builder.form-horizontal .control-label {
            text-align: left;
        }
        .builder.formbuilder-box .form-builder.form-horizontal .left {
            width: 15%;
            float: left;
        }
        .builder.formbuilder-box .form-builder.form-horizontal .right {
            width: 85%;
            float: left;
        }
    }
    @media (min-width: 992px) {
        .builder.formbuilder-box .form-builder.form-horizontal .left {
            width: 12%;
            float: left;
        }
        .builder.formbuilder-box .form-builder.form-horizontal .right {
            width: 88%;
            float: left;
        }
    }
    @media (max-width: 768px) {
        .builder.formbuilder-box {
            padding: 0 15px;
        }
        .builder.formbuilder-box .builder-tabs-link {
            margin: 0 -15px;
        }
        .builder.formbuilder-box .form-builder .bottom_button_list .btn {
            width: 100%;
            margin-bottom: 15px;
        }
    }
    .zoom-img-wrap {
        position: absolute;
    }
</style>


    <script type="text/javascript" src="//cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <script type="text/javascript">
        window.jQuery || document.write('<script type="text/javascript" src="http://127.0.0.1/fzsp/Public/libs/jquery/1.x/jquery.min.js"><\/script>');
        window.lingyun = {
            "app_debug"     : "<?php echo C('app_debug'); ?>",
            "app_debug_msg" : "调试模式已关闭",
            "top_home_page" : "<?php echo C('TOP_HOME_PAGE');?>",
            "home_page"     : "<?php echo C('HOME_PAGE');?>",
            "var_root "     : "/fzsp",
            "default_img"   : "<?php echo get_cover('', 'default');?>"
        }
    </script>
</head>
<body class="<?php echo ($_page_name); ?>">
    <?php $main_nav_limit = $_COOKIE['ly_main_nav_limit'] ? : 6; ?>
    <div class="clearfix full-header">
        
            <?php if (!C('ADMIN_TABS')): ?>
                <!-- 顶部导航 -->
                <div class="navbar navbar-default navbar-fixed-top main-nav" role="navigation" style="background-color: #293038;">
                    <div class="container-fluid">
                        <div>
                            <div class="navbar-header navbar-header-default">
                                <!-- <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse-top">
                                    <span class="sr-only">切换导航</span>
                                    <span class="icon-bar"></span>
                                    <span class="icon-bar"></span>
                                    <span class="icon-bar"></span>
                                </button> -->
                                
                                <!-- 一键切换后台模式 -->
                                <span class="hidden-xs btn btn-sm ajax-get pull-right m-t-sm m-r-xs" style="" href="<?php echo U('Admin/Config/toggle', array('name' => 'ADMIN_TABS'));?>"><i class="fa fa-navicon" style="font-size: 15px;"></i></span>
                            </div>
                            <div class="navbar-header navbar-header-inverse" style="background-color: #293038;">
                                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse-top">
                                    <span class="sr-only">切换导航</span>
                                    <span class="icon-bar"></span>
                                    <span class="icon-bar"></span>
                                    <span class="icon-bar"></span>
                                </button>
                                
                                    <a class="navbar-brand" href="/fzsp/admin.php">
                                        <img class="logo img-responsive" src="/fzsp/xingtu.ico">
                                    </a>
                               
                                    <a class="navbar-brand" href="/fzsp/admin.php">
                                        <span>星途管理系统</span>
                                    </a>
                                
                            </div>
                            <div class="collapse navbar-collapse navbar-collapse-top">
                                <ul class="nav navbar-nav navbar-right">
                                    <li>
                                        <a href="<?php echo U('Admin/Index/removeRuntime');?>" style="border: 0;text-align: left" class="btn ajax-get b-r-0 no-refresh">
                                            <i class="fa fa-trash"></i>
                                            <span>清空缓存</span>
                                        </a>
                                    </li>
                                    <li>
                                        <a target="_blank" href="/fzsp/"><i class="fa fa-external-link"></i>
                                            <span>打开前台</span>
                                        </a>
                                    </li>
                                    <li class="dropdown">
                                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                            <i class="fa fa-user"></i>
                                            <span><?php echo ($_user_auth["username"]); ?></span>
                                            <span style="margin-top: -2px;" class="badge badge-danger"><?php echo ($_SESSION['ly_home_']['new_message']); ?></span>
                                            <b class="caret"></b>
                                        </a>
                                        <ul class="dropdown-menu" role="menu">
                                            <li><a target="_blank" href="/fzsp/"><i class="fa fa-external-link"></i> 打开前台</a></li>
                                            <li>
                                                <a target="_blank" href="<?php echo oc_url('User/Message/index', '', true, true);?>">
                                                    <i class="fa fa-bell"></i>
                                                    <span>我的消息</span>
                                                    <span style="margin-top: -2px;" class="badge badge-danger"><?php echo ($_SESSION['ly_home_']['new_message']); ?></span>
                                                </a>
                                            </li>
                                            <li><a href="<?php echo U('Admin/Index/removeRuntime');?>" style="border: 0;text-align: left" class="btn ajax-get no-refresh"><i class="fa fa-trash"></i> 清空缓存</a></li>
                                            <li><a href="<?php echo U('Admin/Login/logout');?>" class="ajax-get"><i class="fa fa-sign-out"></i> 退出</a></li>
                                        </ul>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            <?php endif; ?>
        
    </div>

    <div class="clearfix full-container" id="full-container">
        
            <?php if (!C('ADMIN_TABS')): ?>
                <div class="container-fluid with-top-navbar">
                    <div class="row" style="background: #fff;">
                        <!-- 后台左侧导航 -->
                        <?php if (!request()->isMobile()): ?>
                            <div id="sidebar" class="col-xs-12 col-sm-3 sidebar tab-content">
                                <!-- 模块菜单 -->
                                <nav class="navside navside-default" role="navigation">
                                    <?php if($_current_menu_list['_child']): ?>
                                        <ul class="nav navside-nav navside-first">
                                            <?php if(is_array($_current_menu_list["_child"])): $fkey = 0; $__LIST__ = $_current_menu_list["_child"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$_ns_first): $mod = ($fkey % 2 );++$fkey; if(!($_ns_first['is_dev'] && !C('DEVELOP_MODE'))): ?>
                                                    <li>
                                                        <a data-toggle="collapse" href="#navside-collapse-<?php echo ($_ns["id"]); ?>-<?php echo ($fkey); ?>">
                                                            <i class="<?php echo ($_ns_first["icon"]); ?>"></i>
                                                            <span class="nav-label"><?php echo ($_ns_first["title"]); ?></span>
                                                            <span class="angle fa fa-angle-down"></span>
                                                            <span class="angle-collapse fa fa-angle-left"></span>
                                                        </a>
                                                        <?php if(!empty($_ns_first["_child"])): ?><ul class="nav navside-nav navside-second collapse in" id="navside-collapse-<?php echo ($_ns["id"]); ?>-<?php echo ($fkey); ?>">
                                                                <?php if(is_array($_ns_first["_child"])): $skey = 0; $__LIST__ = $_ns_first["_child"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$_ns_second): $mod = ($skey % 2 );++$skey; if(!($_ns_second['is_dev'] && !C('DEVELOP_MODE'))): ?>
                                                                        <li <?php if($_parent_menu_list[2]['url'] == $_ns_second['url']) echo 'class="active"'; ?>>
                                                                            <a href="<?php echo U($_ns_second['url']);?>" >
                                                                                <i class="<?php echo ($_ns_second["icon"]); ?>"></i>
                                                                                <span class="nav-label"><?php echo ($_ns_second["title"]); ?></span>
                                                                            </a>
                                                                        </li>
                                                                    <?php endif; endforeach; endif; else: echo "" ;endif; ?>
                                                            </ul><?php endif; ?>
                                                    </li>
                                                <?php endif; endforeach; endif; else: echo "" ;endif; ?>
                                        </ul>
                                    <?php endif; ?>
                                </nav>
                            </div>
                        <?php endif; ?>

                        <!-- 右侧内容 -->
                        <div id="main" class="col-xs-12 col-sm-9 main"  style="overflow-y: scroll;">
                            <!-- 面包屑导航 -->
                            <ul class="breadcrumb">
                                <li><i class="fa fa-map-marker"></i></li>
                                <?php if(is_array($_parent_menu_list)): $i = 0; $__LIST__ = $_parent_menu_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li class="text-muted"><?php echo ($vo["title"]); ?></li><?php endforeach; endif; else: echo "" ;endif; ?>
                            </ul>

                            <!-- 主体内容区域 -->
                            <div class="tab-content ct-tab-content">
                                
    <script type="text/javascript" src="/fzsp/PUBLIC/Ueditor/ueditor.config.js"></script>
    <script type="text/javascript" src="/fzsp/PUBLIC/Ueditor/ueditor.all.min.js"></script>
    <script type="text/javascript" src="/fzsp/PUBLIC/ueditor/lang/zh-cn/zh-cn.js"></script>
    <script type="text/javascript">
      UE.getEditor('intro_detail',{  //intro_detail为要编辑的textarea的id
        initialFrameWidth: 1000,  //初始化宽度
        initialFrameHeight: 500,  //初始化高度
      });
     
    </script>
        <div class="panel-body">
            <form action="<?php echo url('');?>" method="post" class="form form-builder">
                <ul class="nav-tabs nav">
                    <li class="active"><a href="#tab1" data-toggle="tab">产品信息</a></li>
                    <!-- <li class="img"><a href="#tab2" data-toggle="tab">图片管理</a></li> -->
                    <li class="text"><a href="#tab3" data-toggle="tab">描述</a></li>
                    <!-- <?php if(($info["id"]) != "1"): ?><li><a href="#tab2" data-toggle="tab">图片管理</a></li><?php endif; ?> -->
                </ul>
                <div class="tab-content">
                    <div id="tab1" class="tab-pane active">
                        <div class="form-group"></div>
                        <?php if(($info["id"]) != "1"): ?><div class="form-group">
                                <label class="left control-label">所属分类：</label>
                                <div class="right">
                                    <select name="group" class="form-control select lyui-select">
                                        <?php if(is_array($all_group)): $i = 0; $__LIST__ = $all_group;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$group): $mod = ($i % 2 );++$i;?><option value="<?php echo ($group); ?>"
                                                <?php if($key == $info['pid']) echo 'selected="selected"'; ?> >
                                                <?php echo ($group); ?>
                                            </option><?php endforeach; endif; else: echo "" ;endif; ?>
                                    </select>
                                </div>
                            </div>
                        <?php else: ?>
                            <!-- <div class="alert alert-success"><?php echo ($info["title"]); ?>拥有后台所有权限</div> --><?php endif; ?>
                        <div class="form-group">
                            <label class="left control-label">信息标题：</label>
                            <div class="right">
                                <input type="text" class="form-control input" name="title" value="<?php echo ((isset($info["title"]) && ($info["title"] !== ""))?($info["title"]):''); ?>">
                            </div>
                        </div>
                        
                    </div>
                    <?php if(($info["id"]) != "1"): ?><div id="tab3" class="tab-pane">
                            <!-- <h1>百度编辑器</h1> -->
                            <textarea name="main" id="intro_detail" style="height: 500px;"><?php echo ($info["main"]); ?></textarea>
                        </div>
                        <div class="form-group"></div>
                        </div><?php endif; ?>
                </div>
                <div class="form-group"></div>
                <div class="form-group">
                    <input type="hidden" name="id" value="<?php echo ((isset($info["id"]) && ($info["id"] !== ""))?($info["id"]):''); ?>">
                    <button style="width: 120px;" class="btn btn-primary submit ajax-post" type="submit" target-form="form">确定</button>
                    <button style="width: 120px;" class="btn btn-danger return" onclick="javascript:history.back(-1);return false;">取消</button>
                </div>
            </form>
        </div>
    </div>

                            </div>

                            <div class="clearfix footer hidden-xs">
                                <div class="navbar navbar-default" role="navigation">
                                    <div class="container－fluid">
                                        <div class="navbar-header">
                                            <a class="navbar-brand" target="_blank" href="http://zhangzhenzen.xin/">
                                                <span>星途</span>
                                            </a>
                                        </div>
                                        <div class="collapse navbar-collapse navbar-collapse-bottom">
                                            <ul class="nav navbar-nav">
                                                <li>
                                                    <a href="http://zhangzhenzen.xin/" class="text-muted" target="_blank">
                                                        <span>版权所有 © 2014-<?php echo date("Y",time()); ?></span>
                                                    </a>
                                                </li>
                                            </ul>
                                            <ul class="nav navbar-nav navbar-right">
                                                <li><a class="text-muted pull-right">Powered By 星途</a></li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            <?php endif; ?>
        
    </div>

    <div class="clearfix full-footer">
        
    </div>

    <div class="clearfix full-script">
        <div class="container-fluid">
            <input type="hidden" id="corethink_home_img" value="http://127.0.0.1/fzsp/Application/Home/View/Public/img">
            <script type="text/javascript" src="http://127.0.0.1/fzsp/Public/libs/lyui/dist/js/lyui.min.js"></script>
            <script type="text/javascript" src="http://127.0.0.1/fzsp/Application/Admin/View/Public/js/admin.js"></script>
            <script type="text/javascript">
                $(function(){
                    // 计算相关参数用于决定顶部导航显示数量
                    var total_width = $(window).width();
                    var main_nav_limit = parseInt((total_width-220-297)/90);
                    $.cookie('ly_main_nav_limit', main_nav_limit, { expires: 100 });
                });
            </script>
            
    <script type="text/javascript">
        $(function(){
            $('.auth input[type="checkbox"]').on('change',function(){
                //遍历选中当前权限的子权限
                $('.'+$(this).attr('data-module-name')+' .auth'+$(this).val()).find('input').prop('checked',this.checked);

                //遍历选中当前权限的父权限
                if ($(this).is(':checked') == true) {
                    var $fix = $(this);
                    while ($fix.length > 0) {
                        var $tmp = $fix.closest('div').prev('label').find('input');
                        console.log($tmp);
                        if ($tmp.length > 0) {
                            $tmp.attr("checked",true);
                            $fix = $tmp;
                        } else {
                            break;
                        }
                    }
                }
            });
        });
    </script>

        </div>
    </div>
</body>
</html>